Optimal. Leaf size=38 \[ \frac{\tanh (x)}{a}-\frac{b \tanh ^{-1}\left (\frac{\sqrt{a} \tanh (x)}{\sqrt{a+b}}\right )}{a^{3/2} \sqrt{a+b}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0789743, antiderivative size = 38, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 15, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.2, Rules used = {3187, 453, 208} \[ \frac{\tanh (x)}{a}-\frac{b \tanh ^{-1}\left (\frac{\sqrt{a} \tanh (x)}{\sqrt{a+b}}\right )}{a^{3/2} \sqrt{a+b}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3187
Rule 453
Rule 208
Rubi steps
\begin{align*} \int \frac{\text{sech}^2(x)}{a+b \cosh ^2(x)} \, dx &=-\operatorname{Subst}\left (\int \frac{1-x^2}{x^2 \left (a-(a+b) x^2\right )} \, dx,x,\coth (x)\right )\\ &=\frac{\tanh (x)}{a}-\frac{b \operatorname{Subst}\left (\int \frac{1}{a+(-a-b) x^2} \, dx,x,\coth (x)\right )}{a}\\ &=-\frac{b \tanh ^{-1}\left (\frac{\sqrt{a} \tanh (x)}{\sqrt{a+b}}\right )}{a^{3/2} \sqrt{a+b}}+\frac{\tanh (x)}{a}\\ \end{align*}
Mathematica [A] time = 0.0770049, size = 38, normalized size = 1. \[ \frac{\tanh (x)}{a}-\frac{b \tanh ^{-1}\left (\frac{\sqrt{a} \tanh (x)}{\sqrt{a+b}}\right )}{a^{3/2} \sqrt{a+b}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] time = 0.042, size = 99, normalized size = 2.6 \begin{align*} -{\frac{b}{2}\ln \left ( \sqrt{a+b} \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) ^{2}+2\,\sqrt{a}\tanh \left ( x/2 \right ) +\sqrt{a+b} \right ){a}^{-{\frac{3}{2}}}{\frac{1}{\sqrt{a+b}}}}+{\frac{b}{2}\ln \left ( \sqrt{a+b} \left ( \tanh \left ({\frac{x}{2}} \right ) \right ) ^{2}-2\,\sqrt{a}\tanh \left ( x/2 \right ) +\sqrt{a+b} \right ){a}^{-{\frac{3}{2}}}{\frac{1}{\sqrt{a+b}}}}+2\,{\frac{\tanh \left ( x/2 \right ) }{a \left ( \left ( \tanh \left ( x/2 \right ) \right ) ^{2}+1 \right ) }} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F(-2)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: ValueError} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] time = 2.21949, size = 1277, normalized size = 33.61 \begin{align*} \text{result too large to display} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F] time = 0., size = 0, normalized size = 0. \begin{align*} \int \frac{\operatorname{sech}^{2}{\left (x \right )}}{a + b \cosh ^{2}{\left (x \right )}}\, dx \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.34357, size = 78, normalized size = 2.05 \begin{align*} -\frac{b \arctan \left (\frac{b e^{\left (2 \, x\right )} + 2 \, a + b}{2 \, \sqrt{-a^{2} - a b}}\right )}{\sqrt{-a^{2} - a b} a} - \frac{2}{a{\left (e^{\left (2 \, x\right )} + 1\right )}} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]